package com.ruoyi.merchant.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * 店铺：存储店铺的基本信息对象 shop
 * 
 * @author ruoyi
 * @date 2025-09-15
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(indexName = "shop")
public class Shop extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Integer id;

    /** 店名 */
    @Field(analyzer = "ik_min_word")
    @Excel(name = "店名")
    private String name;

    /** 经营区域 */
    @Excel(name = "经营区域")
    private String operatingArea;

    /** 注册时间 */
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "注册时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date regTime;

    /** 开始营业时间 */
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "开始营业时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /** 停止营业时间 */
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "停止营业时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 详细地址 */
    @Excel(name = "详细地址")
    private String address;

    /** 经度 */
    @Excel(name = "经度")
    private String longitude;

    /** 纬度 */
    @Excel(name = "纬度")
    private String latitude;

    /** 商家介绍 */
    @Excel(name = "商家介绍")
    private String description;

    /** 门店照片（缩略图） */
    @Excel(name = "门店照片", readConverterExp = "缩=略图")
    private String photo;

    /** 商家评分 默认0 */
    @Excel(name = "商家评分 默认0")
    private Double rate;

    /** 所属区域 */
    @Excel(name = "所属区域")
    private Integer area;

    /** （0正常 1放假） */
    @Excel(name = "", readConverterExp = "0=正常,1=放假")
    private Integer status;

    /** 删除状态 */
    @Excel(name = "删除状态")
    private Integer deleted;

    /** 审核状态（0待审核、1系统已审核、2已审核、3已拒绝） */
    @Excel(name = "审核状态", readConverterExp = "0=待审核、1系统已审核、2已审核、3已拒绝")
    private Integer auditStatusId;

    /** 外键关联部门表 */
    private String deptName;

    /** 销量 */
    private Integer saleCount;

    /** 用户和门店之间的距离 */
    private Double distance;

}
